package com.itheima.canal.util;

import com.alibaba.otter.canal.protocol.CanalEntry;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CannalUtil {

    public static Map<String,String> convertToMap(List<CanalEntry.Column> columnList){
        HashMap<String, String> map = new HashMap<>();
        for (CanalEntry.Column column : columnList) {
            map.put(column.getName(),column.getValue());
        }
        return map;
    }
}
